home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 4.0 KB | 98 lines | [TEXT/GEOL] |
- Item 9051249 8-Jan-91 05:35PST
-
- From: POWERUP.ENG Power Up Software,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- ------------------------------------------------------------------------------
-
- Sub: Pascal++
-
- Attn: MacApp.Tech$
- SentBy: James Plamondon
- Subject: Pascal++
- Dear Mr. White,
-
- I read with considerable interest your excellent article on Pascal++ in this
- month's issue of Frameworks. I hope that you will forgive my boldness in
- offering you my thoughts on it.
-
- First, allow me to say that — short of the ideal case, which simply adopts
- Eiffel and calls it "Pascal 9x" — I find the proposed extensions to be very
- well-considered. They are more complete than I had expected, and at the same
- time, you have clearly resisted the temptation to squeeze in every feature
- known to Man. Well done!
-
- That being said, I can rip the proposal apart with a clear conscience, to wit:
-
- 1. 2.1.2: Returning Objects: "Pascal++ will not support returning objects
- by reference…"
-
- I think that this is a major mistake. To quote "The Annotated C++ Reference
- Manual" (Ellis & Stroustrup, '90), p. 154, "By far the major use of references
- in C++ is for passing arguments and for returning values… in the latter case
- references are used to allow function calls on the left side of assignments."
-
- Specifically, the return of a reference as a function result is required to
- implement subscripting, as described on p. 336-337 (ibid). Subscripting is an
- essential function of any array class. Arrays are, of course, rather
- important in programming; imagine MacApp without TList.
-
- Further, as evidenced by the Eiffel Basic Class Library, a good abstract Array
- class is essential for any number of other related container classes.
-
- It is entirely possible that the implementation of this feature is unfeasible
- for reasons of which I am unaware, or that it is simply too costly in terms of
- space, speed, or development costs. But declining to implement this feature
- will have VERY SIGNIFICANT EFFECTS on the quality of the libraries that can be
- built using Pascal++; the decision not to implement it should, I think, be
- reconsidered.
-
- By the way, I agree with your decision to exclude reference variables from
- Pascal++ (5.4).
-
-
- 2. 2.3: Repeated Inheritance: "When a class inherits from an ancestor
- multiple times through different paths, the class will have separate instances
- of each common field."
-
- I recognize that this is a very thorny problem. C++ resolved it the same
- way, while Eiffel addressed it the other way — common fields share the same
- instance, using renaming to provide separate instances where desired. I also
- am aware that Meyer's gang has had trouble getting their implementation of
- Eiffel's mechanism working. Still, it seems like such a much more elegant
- system (given the existence of a renaming mechanism), that I'd love to see
- Eiffel's mechanism implemented instead of C++'s.
-
-
- 3. 6.4: Assertions: "Pascal++ will follow Eiffel's sematics closely."
-
- Meyer is currently looking at changing the way pre- and post- conditions are
- inherited in Eiffel, by allowing the form…
- require else
- <additional precondition>
- ensure then
- <additional postcondition>
- …which would append the current class' conditions to those of the ancestor(s)
- in "the right way." This is a considerable extension to the existing
- mechanism, which requires that the pre- and post- conditions of the
- parent(s)'s routine be repeated in the source of the child's routine (a
- significant source of programming errors).
-
-
- I have one other general comment: I can see why the working name "Pascal++"
- was chosen, but I detest it, and would wish that you had chosen almost any
- other name. I would have thought that the name "Pascal 9x," or even "Ninex,"
- would have been sufficient.
-
- The name "Pascal++" debases Pascal by associating it with C++, the "George
- Bush" of computer languages. This makes Pascal++ what — the "Dan Quail"
- thereof?
-
- Shuddering at the implications, I remain
-
- Yours,
-
- James Plamondon
-
-